const state = {
  // 用户信息
  user: {}
}

const mutations = {
  setUser (state, param) {
    state.user = param
  },
  clearUser (state) {
    state.user = {}
  }
}

const actions = {
  setUser: ({ commit }, param) => {
    commit('setUser', param)
  },
  clearUser: ({ commit }) => {
    commit('clearUser')
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
